import { routerMiddleware } from 'react-router-redux';
import thunkMiddleware from 'redux-thunk';
import loggerMiddleware from './loggerMiddleware';
import promiseMiddleware from './promiseMiddleware';
import errorMiddleware from './errorMiddleware';

const middlewares = [
  loggerMiddleware,
  errorMiddleware,
  thunkMiddleware,
  promiseMiddleware,
];

/**
 * 向外提供的middlewar包括：routerMiddleware, errorMiddleware，promiseMiddleware, thunkMiddleware
 * @namespace middlewares
 * @memberOf kryfe-lib
 */
export default {
  routerMiddleware,
  promiseMiddleware,
  thunkMiddleware,
  errorMiddleware,
  middlewares,
};
